<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/28 0028
 * Time: 11:00
 */

namespace app\admin\model;


use think\Model;

/**
 * Class Integralproducts
 * @package app\admin\model
 * 积分商品
 */
class Integralproducts extends Model
{
    /**
     *
     */
    public function getStoreProduct(){
        return $this->hasOne('product','id','productId');
    }



    public function findIntegralproducts($data){
       return self::where([
           'storeId'=>$data['storeId'],
           'productId'=>$data['productId']
           ])->find();
    }

}